import { defHttp } from "@/utils/http/axios";
import { CooperationType } from "./type";
import { BasicFetchResult } from "@/api/model/baseModel";

enum Api {
    getCooperationTypesList = '/admin/org/boCooperationType/list',
    delCooperationType = "/admin/org/boCooperationType/delete",
    boCooperationTypeInsertOrUpdate = "/admin/org/boCooperationType/insertOrUpdate"
}


/**
 * @description 获取合作类型列表
 * @date
 * @export
 * @param
 */
export function getCooperationTypesList(params: any) {
    return defHttp.get<BasicFetchResult<CooperationType>>({
        url: Api.getCooperationTypesList,
        params
    });
}


/**
 * 删除合作类型
 * @param id 
 * @returns 
 */
export function delCooperationType(id: number) {
    return defHttp.post({
        url: Api.delCooperationType,
        params: { id }
    });
}


/**
 * 创建合作类型
 * @param params 
 * @returns 
 */
export function boCooperationTypeInsertOrUpdate(params: CooperationType) {
    return defHttp.post({
        url: Api.boCooperationTypeInsertOrUpdate,
        params
    });
}



